		
		<select name="search_timefield">
			<option value="create_time" {:input('search_timefield')=='create_time'?'selected':''}>下单日期</option>
			<option value="pay_time" {:input('search_timefield')=='pay_time'?'selected':''}>付款日期</option>
		</select>
		<input type="text" placeholder='开始日期' value="{:input('search_begintime')}" class="search_begintime time" name="search_begintime">
		<input type="text" placeholder='结束日期' value="{:input('search_endtime')}" class="search_endtime time" name="search_endtime">
		<script>laydate.render({ elem: '.search_begintime',type: 'datetime'});</script>
		<script>laydate.render({ elem: '.search_endtime',type: 'datetime'});</script>
		
		
		<select name="search_pay_status">
			<option value="">支付状态</option>
			<option value="0" {:input('search_pay_status')==='0'?'selected':''}>未付款</option>
			<option value="1" {:input('search_pay_status')=='1'?'selected':''}>已付款</option>
		</select>
		<select name="search_shipping_status">
			<option value="">发货状态</option>
			<option value="0" {:input('search_shipping_status')==='0'?'selected':''}>未发货</option>
			<option value="1" {:input('search_shipping_status')=='1'?'selected':''}>已发货</option>
		</select>
		<select name="search_receive_status">
			<option value="">收货状态</option>
			<option value="0" {:input('search_receive_status')==='0'?'selected':''}>未签收</option>
			<option value="1" {:input('search_receive_status')=='1'?'selected':''}>已签收</option>
		</select>

		<select name="search_field">
			<option value="">选择字段</option>
			{if $tab_ext.id}
				<option value="{$tab_ext.id}" {:input('search_field')=='id'?'selected':''}>用户{$tab_ext.id}</option>
			{else /}
				<option value="id" {:input('search_field')=='id'?'selected':''}>{$tab_ext.id_name?:'ID'}</option>
			{/if}
			{volist name="$tab_ext.search" id="name"}
				<option value="{$key}" {:input('search_field')==$key?'selected':''}>{$name}</option> 
			{/volist}
		</select>
		<input type="text" placeholder='请输入关键字' value="{:input('keyword')}" class="search_word" name="search_word"> <input onclick="search_content()" type="button" name="" value="搜索" class="layui-btn layui-btn-sm">

<script type="text/javascript">
function search_content(){
	var field = $("select[name='search_field']").val();
	var keyword = $("input[name='search_word']").val();
	var search_fid = $("select[name='search_fid']").length>0 ? $("select[name='search_fid']").val() : '';
	var search_status = $("select[name='search_status']").length>0 ? $("select[name='search_status']").val() : '';
	var search_begintime = $("input[name='search_begintime']").length>0 ? $("input[name='search_begintime']").val() : '';
	var search_endtime = $("input[name='search_endtime']").length>0 ? $("input[name='search_endtime']").val() : '';

	var search_pay_status = $("select[name='search_pay_status']").length>0 ? $("select[name='search_pay_status']").val() : '';
	var search_shipping_status = $("select[name='search_shipping_status']").length>0 ? $("select[name='search_shipping_status']").val() : '';
	var search_receive_status = $("select[name='search_receive_status']").length>0 ? $("select[name='search_receive_status']").val() : '';
	

	if(keyword!='' && field==''){
		layer.alert('请选择搜索字段类型');
		return ;
	}
	var url = location.href.indexOf('?')>0 ? location.href.substr(0,location.href.indexOf('?')) : location.href;
	url +='?search_field=' + field + '&keyword=' +keyword;
	
	if(search_begintime!=''){
		url +='&search_begintime=' + search_begintime;
	}
	if(search_endtime!=''){
		url +='&search_endtime=' + search_endtime;
	}
	if(search_begintime!=''||search_endtime!=''){
		url +='&search_timefield='+$("select[name='search_timefield']").val();
	}

	if(search_pay_status!==''){
		url +='&search_pay_status=' + search_pay_status;
	}
	if(search_shipping_status!==''){
		url +='&search_shipping_status=' + search_shipping_status;
	}
	if(search_receive_status!==''){
		url +='&search_receive_status=' + search_receive_status;
	}

	window.location.href = url;
}
</script>